@import "_vars.styl"

:root {
  --side-bar-bg-color: $cPrimary0;
}

html
  font-size $fontSize
  font-family $fontFamily
  font-weight $fontWeight
  font-smooth always
  -webkit-font-smoothing subpixel-antialiased
  -moz-osx-font-smoothing grayscale

body
  line-height $lineHeight
  letter-spacing 0.028em
  background-color $cPrimary1
  color rgba($cPrimary12, 0.8)
  -webkit-text-stroke: 0.020em currentColor;

::selection
  background-color $cPrimary6
  color: rgba(255, 255, 255, 0.85)

[mdtype="heading"], [mdlike="h1"], [mdlike="h2"], [mdlike="h3"], [mdlike="h4"], [mdlike="h5"], [mdlike="h6"], .md-heading
  font-family $headingFontFamily !important
  font-weight $headingWeight !important

  a
    text-decoration: none !important

    span
      font-family $headingFontFamily !important
      font-weight $headingWeight !important

.md-header-span, h1, h2, h3, h4, h5, h6
  font-family $headingFontFamily !important
  font-weight $headingWeight !important

// to fix: 聚焦 title 高度抽风变化
.md-focus
  .md-block-like
    display flex

h1, [mdlike="h1"]
  color $cPrimary12
  font-size 2.4em

h2, [mdlike="h2"]
  color $cPrimary11
  font-size 2em

h3, [mdlike="h3"]
  color $cPrimary10
  font-size 1.8em

h4, [mdlike="h4"]
  color $cPrimary9
  font-size 1.6em

h5, [mdlike="h5"]
  color $cPrimary8
  font-size 1.4em

h6, [mdlike="h6"]
  color $cPrimary7
  font-size 1.2em

strong
  font-family $strongFontFamily
  font-weight $strongWeight

a
  color $cSecondary5
  text-decoration-skip-ink: auto

.md-link
  color $cPrimary8

  span
    font-family $fontFamily
    font-weight $fontWeight

  .md-content
    color $linkAddressColor
    font-family $fontFamily
    font-weight $fontWeight

.md-meta, .md-blockmeta
  color $mdSyntaxColor !important
  font-family $fontFamily !important
  font-weight $fontWeight !important

.md-pair-s
  .md-before, .md-after
    margin 0 2px
    color $mdSyntaxColor

.md-focus:before
  color $mdSyntaxColor !important
  border-color $mdSyntaxColor !important

code, pre
  font-size 0.95em
  font-family $codeFontFamily !important
  font-weight $codeWeight !important

code
  padding 0 0.25em
  color $codeTextColor
  background-color $codeBgColor
  border-radius 0.3em

.md-fences
  padding 0.25em
  border-radius 0.35em
  background-color: rgba(255, 255, 255, 0.4);

.CodeMirror-wrap
  border-radius 0.25em

.md-fences pre
  margin: 0;

.CodeMirror-gutter-filler,
.CodeMirror-scrollbar-filler
  background-color: transparent;

.CodeMirror-gutter-wrapper, .CodeMirror-linenumber
  user-select: none !important
  -webkit-user-select: none !important

blockquote
  margin-left 0
  margin-right 0
  padding 1em
  background-color rgba(255, 255, 255, 0.4);
  color $rootDarkTheme
  font-size 0.9em

// 这两个官方默认样式已经有了
//blockquote>:first-child, li>:first-child {
//  margin-top: 0;
//}
//blockquote>:last-child {
//  margin-bottom: 0;
//}

.md-toc-content
  .md-toc-item
    display block

    &:first-of-type
      margin-left 0

  .md-toc-h2
    margin-left 1em

  .md-toc-h3
    margin-left 2em

  .md-toc-h4
    margin-left 3em

  .md-toc-h5
    margin-left 4em

  .md-toc-h6
    margin-left 5em

.md-hr
  margin 1.5em 0
  border-top 1px solid $grayColor
  border-bottom 1px solid rgba(white, 0.2)
  hr
    display none

.md-table-fig
  margin 0
  padding 1em
  background-color rgba(255, 255, 255, 0.4);

.md-table
  width 100%
  line-height 1.8

.info-panel-tab
  color $cPrimary10

.sidebar-menu
  background-color $cPrimary1